import 'package:flutter/material.dart';

import 'image_item.dart';
import 'thirdparty/jf_chart/jf_chart.dart';
import 'thirdparty/jf_chart/option/chart.dart';
import 'thirdparty/jf_chart/option/coordinate_system.dart';
import 'thirdparty/jf_chart/option/option.dart';

class DetailPage extends StatelessWidget {
  final ImageItem imageItem;
  final JfChart jfChart = JfChart();

  DetailPage(this.imageItem, {super.key});

  @override
  Widget build(BuildContext context) {
    Option option = Option()
      ..charts = [
        Chart()
          ..coordinateSystem = CoordinateSystem()
          ..xAxis = []
          ..yAxis = []
      ];

    jfChart.setOption(option);

    return Scaffold(
        appBar: AppBar(
          title: Text(imageItem.description),
        ),
        body: jfChart);
  }
}
